from rest_framework.mixins import ListModelMixin,RetrieveModelMixin
from rest_framework.viewsets import GenericViewSet

from .models import News
from .serializer import NewsSerializer


class NewsView(GenericViewSet, ListModelMixin,RetrieveModelMixin):
    queryset = News.objects.all()
    serializer_class = NewsSerializer
